<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="model.*" %>
<%@page import="control.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
 <%
 pageContext.setAttribute("lista", Dados.ListaLivros);
 int paginacao = Integer.parseInt(getServletContext().getInitParameter("paginacao"));
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Biblioteca CultBook</title>
<link href="styles/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%@ include file="templates/topo.jsp" %>

<pg:pager id="p" maxPageItems="<%=paginacao %>" maxIndexPages="10" export="offset,currentPageNumber=pageNumber" scope="request">
  <pg:param name="keywords"/>

<c:forEach var="Livro" items="${lista}">
  <pg:item>
	<a href="livros/livro.jsp?i=${Livro.isbn}"><b>${Livro.titulo}</b></a> - ${Livro.autor}<br>
	<em>${Livro.descricao}</em><br>
	<hr size=1>
		
	
	</pg:item>
</c:forEach>

 <pg:index>

    <pg:prev>
      <a href="<%= pageUrl %>">&lt;&lt; Anterior</a>
    </pg:prev>

    <pg:pages>
       <a href="<%= pageUrl %>"><%= pageNumber %></a> 
    </pg:pages>

    <pg:next>
      <a href="<%= pageUrl %>">Próximo &gt;&gt;</a>
    </pg:next>

   

  </pg:index>
</pg:pager>


<%@ include file="templates/rodape.jsp" %>
</body>
</html>
